home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / WarpQuake / Src / r_misc2.c < prev    next >
C/C++ Source or Header  |  2000-05-22  |  1KB  |  51 lines

  1. /*
  2. Copyright (C) 1996-1997 Id Software, Inc.
  3.  
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
  12.  
  13. See the GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. */
  20. // r_misc2.c
  21.  
  22. #include "quakedef.h"
  23. #include "r_local.h"
  24.  
  25.  
  26. /*
  27. ===================
  28. R_TransformFrustum
  29. ===================
  30. */
  31. void R_TransformFrustum (void)
  32. {
  33.     int        i;
  34.     vec3_t    v, v2;
  35.     
  36.     for (i=0 ; i<4 ; i++)
  37.     {
  38.         v[0] = screenedge[i].normal[2];
  39.         v[1] = -screenedge[i].normal[0];
  40.         v[2] = screenedge[i].normal[1];
  41.  
  42.         v2[0] = v[1]*vright[0] + v[2]*vup[0] + v[0]*vpn[0];
  43.         v2[1] = v[1]*vright[1] + v[2]*vup[1] + v[0]*vpn[1];
  44.         v2[2] = v[1]*vright[2] + v[2]*vup[2] + v[0]*vpn[2];
  45.  
  46.         VectorCopy (v2, view_clipplanes[i].normal);
  47.  
  48.         view_clipplanes[i].dist = DotProduct (modelorg, v2);
  49.     }
  50. }
  51.